package cn.edu.scau.cmi.mengzhuorong.singleton;

public class Marshal {

	private static int number=0;
	static Marshal instance;
	private String name;
	public Marshal (String name) {
		this.name = name;
	}
	public static Marshal getInstance(String name) {
		if(number<=8) {
			instance=new Marshal(name);
			number++;
			return instance;
		}
		else
			return null;
	}
	public String getName() {
		return this.name;
	}
}
